import router from '../router'

export function loseAuth() {
  const unBackList = ['/agreement']
  const fullPath = window.location.hash.split('#')[1]
  let isAllow = false
  unBackList.forEach(it => {
    if(fullPath.includes(it)) {
      isAllow = true
    }
  })
  router.push({
    path: '/login',
    query: {
      redirect: isAllow?'':fullPath.replace(/\&/g, '?')
    }
  })
}